<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>指令简写</title>
    <script src="https://cdn.jsdelivr.net/npm/vue"></script>
</head>

<body>
<div id="app">
<input :disabled="dis"/>
<button @click="alertB">我是按钮</button>


    <pre>
    v-bind:xxx='' 简写为 :xxx=''
    v-on:click='xxx' 简写为 @click='xxx'
    </pre>

    <div>{{fon}}</div>
    <div>{{fon.B}}</div>
</div>

<script>
    var fon = {ao:'lk',B:"B"};
    var v = new Vue({
        el: '#app',
        data:{
            dis:true,
            fon: fon,
        },
        methods:{
            addNewAttr:function () {
                alert(this.fon.B)
            }
        }

    })


</script>

</body>
</html>